import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {VersionInfo} from './home.data';
import {Url} from '../basic/enums/url';
import {ResponseData} from "../basic/commons/base.data";

@Injectable({
    providedIn: 'root'
})
export class HomeService {

    constructor(private http: HttpClient) {
    }

    public getVersion(): Promise<ResponseData<VersionInfo>> {
        return this.http.get<ResponseData<VersionInfo>>(Url.HOME_VERSION_DATA.tokenUrl).toPromise();
    }

}
